#include <iostream>
#include <string>
#include "Skiplist.h"
#include "random.h"

int main() {

    SkipList<int, std::string> skipList(8);
    for (int i = 1; i <= 20; ++i) {
        skipList.insert(i, std::to_string(i+10));
    }

    std::cout << "当前元素个数为:" << skipList.get_count() << std::endl;

    skipList.dump_file();

    skipList.load_file();

    skipList.search(9);
    skipList.search(18);


    skipList.printList();

    skipList.remove(1);
    skipList.remove(8);

    std::cout << "当前元素个数为:" << skipList.get_count() << std::endl;

    skipList.printList();
}
